package main

import (
	"fmt"
	"reflect"
)

func main() {

	a := 1;
	fmt.Println("a memory:", a)
	//内存的地址-指针
	fmt.Println("a address:", &a)
	var a_address *int = &a

	str1 := "strdemo"
	var str_address *string = &str1
	fmt.Println(a_address)
	fmt.Println(str_address)
	fmt.Println(&a_address)

	fmt.Println(":type of a_address:", reflect.TypeOf(a_address))
	*a_address = 22;
	fmt.Println(a)

	//&取指针  *(指针变量):给指针所指变量赋值
	*(&a) = 33
	fmt.Println(a)
}
